<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    /*
    创建对象的三种方法：
    1.字面量创建按对象{描述对象}
    2.构造函数创建对象：第一步定义构造函数，第二步实例化对象
    3.new Object()
    */
   console.log(Math.PI);
   console.log(Math.max(1,45,78,1236,-4556,0,99,-1111));
   console.log(Math.random());
   function getRandomInt(max) {
  return Math.floor(Math.random() * max);
}
console.log(getRandomInt(3));
console.log(getRandomInt(1));
console.log(Math.random());
let arr=["嘻嘻","哈哈","拉拉","紫啧"];
function arr(){

}
console.log(arr.random());
function cai(min,max){
    return Math.floor(Mathr.random()*(max-min+1)+min);
}
let boom = cai(1,10);
let num;
while(true){
    num = prompt('请输入你猜的值！');
}
    if(num==boom){
       alert('你中奖了！'); 
    }else if(num>boom){
        alert('你猜大了');
    }else{
        alert('你猜小了');
    }
</script>
</html>